#pragma once

class FastBlockQueue;
class Callbackable;
class Business;

struct WaitableTimerParameter
{
	Business* business;
	SYSTEMTIME st;
	Callbackable* callback;
};

class WaitableTimerThread
{
	class WaitableTimer;
public:
	WaitableTimerThread(FastBlockQueue& queue)
		:m_queue(queue)
	{
	}
	void Run();
private:
	void UpdateTimer(WaitableTimerParameter const& parameter);

	FastBlockQueue& m_queue;

	typedef std::map<Business*,WaitableTimer*> WaitableTimerMap;
	WaitableTimerMap m_businessWaitableTimerMap;
};